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

Unified Diff: src/fast-codegen.cc

Issue 552232: Introduce a stack-allocated structure to encapsulate compile-time information. (Closed)
Patch Set: Remove inadvertently included files. Created 10 years, 11 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/fast-codegen.h ('k') | src/handles.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/fast-codegen.cc
diff --git a/src/fast-codegen.cc b/src/fast-codegen.cc
index adca9908064d52eee0981cec09cf6281aa221d7b..5a8c09e6e280dc2c48352577e9df97490f0cf6b5 100644
--- a/src/fast-codegen.cc
+++ b/src/fast-codegen.cc
@@ -49,9 +49,10 @@ namespace internal {
} while (false)
-void FastCodeGenSyntaxChecker::Check(FunctionLiteral* fun) {
+void FastCodeGenSyntaxChecker::Check(FunctionLiteral* fun,
+ CompilationInfo* info) {
// We do not specialize if we do not have a receiver.
- if (receiver().is_null()) BAILOUT("No receiver");
+ if (!info->has_receiver()) BAILOUT("No receiver");
// We do not support stack or heap slots (both of which require
// allocation).
@@ -253,10 +254,11 @@ void FastCodeGenSyntaxChecker::VisitAssignment(Assignment* expr) {
// symbol but we do not assume that.
Literal* key = prop->key()->AsLiteral();
if (key != NULL && key->handle()->IsString()) {
+ Handle<Object> receiver = info()->receiver();
Handle<String> name = Handle<String>::cast(key->handle());
LookupResult lookup;
- receiver()->Lookup(*name, &lookup);
- if (lookup.holder() != *receiver()) BAILOUT("Non-own property assignment");
+ receiver->Lookup(*name, &lookup);
+ if (lookup.holder() != *receiver) BAILOUT("Non-own property assignment");
if (!lookup.type() == FIELD) BAILOUT("Non-field property assignment");
} else {
UNREACHABLE();
« no previous file with comments | « src/fast-codegen.h ('k') | src/handles.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698