aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2011-10-20 14:36:23 +0100
committerBen Murdoch <benm@google.com>2011-10-20 14:37:16 +0100
commit203a29f4f37141ddcebc5015e4d3ab2100f2ee45 (patch)
treebabb7cf58c7206b5543f3179e3558d16a2e862a5
parentafcf6d0da905bea0fdfb8b2c48629777819d4370 (diff)
downloadv8-ics-mr0.tar.gz
Bug: 5483703 Change-Id: Idd0a6e0d51047cdd5a87eb745ca41e4994645ea2
-rw-r--r--V8_MERGE_REVISION2
-rwxr-xr-xsrc/compiler.cc1
-rw-r--r--src/compiler.h15
-rw-r--r--src/parser.cc7
-rw-r--r--src/version.cc2
5 files changed, 16 insertions, 11 deletions
diff --git a/V8_MERGE_REVISION b/V8_MERGE_REVISION
index 0c2bd3da..1be7896d 100644
--- a/V8_MERGE_REVISION
+++ b/V8_MERGE_REVISION
@@ -2,4 +2,4 @@ We are tracking the V8 3.2 release branch as used by the Chrome 12 release branc
We have synced V8 past the last revision used in Chrome 12, as we continue to take 3.2 updates.
-http://v8.googlecode.com/svn/branches/3.2@8988
+http://v8.googlecode.com/svn/branches/3.2@9719
diff --git a/src/compiler.cc b/src/compiler.cc
index d8c7706c..6a9bc277 100755
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -525,7 +525,6 @@ Handle<SharedFunctionInfo> Compiler::Compile(Handle<String> source,
info.MarkAsGlobal();
info.SetExtension(extension);
info.SetPreParseData(pre_data);
- if (natives == NATIVES_CODE) info.MarkAsAllowingNativesSyntax();
result = MakeFunctionInfo(&info);
if (extension == NULL && !result.is_null()) {
compilation_cache->PutScript(source, result);
diff --git a/src/compiler.h b/src/compiler.h
index e75e8695..a6a0d903 100644
--- a/src/compiler.h
+++ b/src/compiler.h
@@ -83,11 +83,11 @@ class CompilationInfo BASE_EMBEDDED {
ASSERT(is_lazy());
flags_ |= IsInLoop::encode(true);
}
- void MarkAsAllowingNativesSyntax() {
- flags_ |= IsNativesSyntaxAllowed::encode(true);
+ void MarkAsNative() {
+ flags_ |= IsNative::encode(true);
}
- bool allows_natives_syntax() const {
- return IsNativesSyntaxAllowed::decode(flags_);
+ bool is_native() const {
+ return IsNative::decode(flags_);
}
void SetFunction(FunctionLiteral* literal) {
ASSERT(function_ == NULL);
@@ -163,6 +163,9 @@ class CompilationInfo BASE_EMBEDDED {
void Initialize(Mode mode) {
mode_ = V8::UseCrankshaft() ? mode : NONOPT;
+ if (script_->type()->value() == Script::TYPE_NATIVE) {
+ MarkAsNative();
+ }
if (!shared_info_.is_null() && shared_info_->strict_mode()) {
MarkAsStrictMode();
}
@@ -185,8 +188,8 @@ class CompilationInfo BASE_EMBEDDED {
class IsInLoop: public BitField<bool, 3, 1> {};
// Strict mode - used in eager compilation.
class IsStrictMode: public BitField<bool, 4, 1> {};
- // Native syntax (%-stuff) allowed?
- class IsNativesSyntaxAllowed: public BitField<bool, 5, 1> {};
+ // Is this a function from our natives.
+ class IsNative: public BitField<bool, 6, 1> {};
unsigned flags_;
diff --git a/src/parser.cc b/src/parser.cc
index 266f77d5..ce9b7c3d 100644
--- a/src/parser.cc
+++ b/src/parser.cc
@@ -5141,11 +5141,14 @@ bool ParserApi::Parse(CompilationInfo* info) {
FunctionLiteral* result = NULL;
Handle<Script> script = info->script();
if (info->is_lazy()) {
- Parser parser(script, true, NULL, NULL);
+ bool allow_natives_syntax =
+ FLAG_allow_natives_syntax ||
+ info->is_native();
+ Parser parser(script, allow_natives_syntax, NULL, NULL);
result = parser.ParseLazy(info);
} else {
bool allow_natives_syntax =
- info->allows_natives_syntax() || FLAG_allow_natives_syntax;
+ info->is_native() || FLAG_allow_natives_syntax;
ScriptDataImpl* pre_data = info->pre_parse_data();
Parser parser(script, allow_natives_syntax, info->extension(), pre_data);
if (pre_data != NULL && pre_data->has_error()) {
diff --git a/src/version.cc b/src/version.cc
index e42f77c5..1d59be3c 100644
--- a/src/version.cc
+++ b/src/version.cc
@@ -35,7 +35,7 @@
#define MAJOR_VERSION 3
#define MINOR_VERSION 2
#define BUILD_NUMBER 10
-#define PATCH_LEVEL 38
+#define PATCH_LEVEL 39
// Use 1 for candidates and 0 otherwise.
// (Boolean macro values are not supported by all preprocessors.)
#define IS_CANDIDATE_VERSION 0