Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(933)

Unified Diff: src/compiler.h

Issue 7085034: Reapply change to Pass undefined to JS builtins when called with (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/compiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler.h
diff --git a/src/compiler.h b/src/compiler.h
index 4eb33e2976f3634412a1f311015f8f700244ed04..c8ec2e5ef4a3b0dc02b94bc0f12318d40fdc662d 100644
--- a/src/compiler.h
+++ b/src/compiler.h
@@ -89,6 +89,12 @@ class CompilationInfo BASE_EMBEDDED {
bool allows_natives_syntax() const {
return IsNativesSyntaxAllowed::decode(flags_);
}
+ void MarkAsNative() {
+ flags_ |= IsNative::encode(true);
+ }
+ bool is_native() const {
+ return IsNative::decode(flags_);
+ }
void SetFunction(FunctionLiteral* literal) {
ASSERT(function_ == NULL);
function_ = literal;
@@ -167,9 +173,11 @@ class CompilationInfo BASE_EMBEDDED {
void Initialize(Mode mode) {
mode_ = V8::UseCrankshaft() ? mode : NONOPT;
- if (!shared_info_.is_null() && shared_info_->strict_mode()) {
- MarkAsStrictMode();
+ if (!shared_info_.is_null()) {
+ if (shared_info_->strict_mode()) MarkAsStrictMode();
+ if (shared_info_->native()) MarkAsNative();
}
+
}
void SetMode(Mode mode) {
@@ -191,6 +199,9 @@ class CompilationInfo BASE_EMBEDDED {
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_;
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698