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

Unified Diff: src/codegen-ia32.cc

Issue 16238: Update comment and add assert.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 12 years 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 | « no previous file | src/objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codegen-ia32.cc
===================================================================
--- src/codegen-ia32.cc (revision 1015)
+++ src/codegen-ia32.cc (working copy)
@@ -3875,6 +3875,8 @@
// distinction between expressions in a typeof and not in a
// typeof.
Variable* var = expression_->AsVariableProxy()->AsVariable();
+ bool is_global = var != NULL;
+ ASSERT(!is_global || var->is_global());
// Inline array load code if inside of a loop. We do not know
// the receiver map yet, so we initially generate the code with
// a check against an invalid map. In the inline cache code, we
@@ -3882,11 +3884,12 @@
if (cgen_->loop_nesting() > 0) {
Comment cmnt(masm, "[ Inlined array index load");
DeferredReferenceGetKeyedValue* deferred =
- new DeferredReferenceGetKeyedValue(cgen_, var != NULL);
+ new DeferredReferenceGetKeyedValue(cgen_, is_global);
// Load receiver and check that it is not a smi (only needed
- // if not contextual) and that it has the expected map.
+ // if this is not a load from the global context) and that it
+ // has the expected map.
__ mov(edx, Operand(esp, kPointerSize));
- if (var == NULL) {
+ if (!is_global) {
__ test(edx, Immediate(kSmiTagMask));
__ j(zero, deferred->enter(), not_taken);
}
@@ -3921,8 +3924,7 @@
} else {
Comment cmnt(masm, "[ Load from keyed Property");
Handle<Code> ic(Builtins::builtin(Builtins::KeyedLoadIC_Initialize));
- if (var != NULL) {
- ASSERT(var->is_global());
+ if (is_global) {
__ call(ic, RelocInfo::CODE_TARGET_CONTEXT);
} else {
__ call(ic, RelocInfo::CODE_TARGET);
« no previous file with comments | « no previous file | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698