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

Unified Diff: src/compiler.h

Issue 7068009: Pass undefined to JS builtins when called with implicit receiver. (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
Index: src/compiler.h
diff --git a/src/compiler.h b/src/compiler.h
index 4eb33e2976f3634412a1f311015f8f700244ed04..a02ed1d777b5ddc22d25d83b6e4b79fafd17bdab 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 MarkAsES5Native() {
Lasse Reichstein 2011/05/26 08:26:55 Why ES5Native and not just Native? Is there any na
Mads Ager (chromium) 2011/05/26 10:14:07 Following naming elsewhere to not have two names f
+ flags_ |= IsES5Native::encode(true);
+ }
+ bool is_es5_native() const {
+ return IsES5Native::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_->es5_native()) MarkAsES5Native();
}
+
}
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 IsES5Native: public BitField<bool, 6, 1> {};
+
unsigned flags_;
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/compiler.cc » ('j') | src/v8natives.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698