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

Unified Diff: src/full-codegen.cc

Issue 1222203007: Use FullCodeGenerator::EmitGlobalVariableLoad() where possible to avoid code duplication. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebasing Created 5 years, 5 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/full-codegen.h ('k') | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/full-codegen.cc
diff --git a/src/full-codegen.cc b/src/full-codegen.cc
index 03c55d118ca29114e059adfc06005b58ffa8e82a..8ca40ccacd568033cee8b9cafd8a56a055ed0485 100644
--- a/src/full-codegen.cc
+++ b/src/full-codegen.cc
@@ -214,11 +214,6 @@ void FullCodeGenerator::CallLoadIC(ContextualMode contextual_mode,
}
-void FullCodeGenerator::CallGlobalLoadIC(Handle<String> name) {
- return CallLoadIC(CONTEXTUAL);
-}
-
-
void FullCodeGenerator::CallStoreIC(TypeFeedbackId id) {
Handle<Code> ic = CodeFactory::StoreIC(isolate(), language_mode()).code();
CallIC(ic, id);
@@ -612,6 +607,22 @@ void FullCodeGenerator::VisitArithmeticExpression(BinaryOperation* expr) {
}
+void FullCodeGenerator::VisitForTypeofValue(Expression* expr) {
+ VariableProxy* proxy = expr->AsVariableProxy();
+ DCHECK(!context()->IsEffect());
+ DCHECK(!context()->IsTest());
+
+ if (proxy != NULL && (proxy->var()->IsUnallocatedOrGlobalSlot() ||
+ proxy->var()->IsLookupSlot())) {
+ EmitVariableLoad(proxy, INSIDE_TYPEOF);
+ PrepareForBailout(proxy, TOS_REG);
+ } else {
+ // This expression cannot throw a reference error at the top level.
+ VisitInDuplicateContext(expr);
+ }
+}
+
+
void FullCodeGenerator::VisitBlock(Block* stmt) {
Comment cmnt(masm_, "[ Block");
NestedBlock nested_block(this, stmt);
« no previous file with comments | « src/full-codegen.h ('k') | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698