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

Side by Side Diff: src/x64/fast-codegen-x64.cc

Issue 366028: Make "typeof this" return object in fast compiler. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/ia32/fast-codegen-ia32.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1084 matching lines...) Expand 10 before | Expand all | Expand 10 after
1095 true_label_ = saved_true; 1095 true_label_ = saved_true;
1096 false_label_ = saved_false; 1096 false_label_ = saved_false;
1097 break; 1097 break;
1098 } 1098 }
1099 1099
1100 case Token::TYPEOF: { 1100 case Token::TYPEOF: {
1101 Comment cmnt(masm_, "[ UnaryOperation (TYPEOF)"); 1101 Comment cmnt(masm_, "[ UnaryOperation (TYPEOF)");
1102 ASSERT_EQ(Expression::kValue, expr->expression()->context()); 1102 ASSERT_EQ(Expression::kValue, expr->expression()->context());
1103 1103
1104 VariableProxy* proxy = expr->expression()->AsVariableProxy(); 1104 VariableProxy* proxy = expr->expression()->AsVariableProxy();
1105 if (proxy != NULL && proxy->var()->is_global()) { 1105 if (proxy != NULL &&
1106 !proxy->var()->is_this() &&
1107 proxy->var()->is_global()) {
1106 Comment cmnt(masm_, "Global variable"); 1108 Comment cmnt(masm_, "Global variable");
1107 __ push(CodeGenerator::GlobalObject()); 1109 __ push(CodeGenerator::GlobalObject());
1108 __ Move(rcx, proxy->name()); 1110 __ Move(rcx, proxy->name());
1109 Handle<Code> ic(Builtins::builtin(Builtins::LoadIC_Initialize)); 1111 Handle<Code> ic(Builtins::builtin(Builtins::LoadIC_Initialize));
1110 // Use a regular load, not a contextual load, to avoid a reference 1112 // Use a regular load, not a contextual load, to avoid a reference
1111 // error. 1113 // error.
1112 __ Call(ic, RelocInfo::CODE_TARGET); 1114 __ Call(ic, RelocInfo::CODE_TARGET);
1113 __ movq(Operand(rsp, 0), rax); 1115 __ movq(Operand(rsp, 0), rax);
1114 } else if (proxy != NULL && 1116 } else if (proxy != NULL &&
1115 proxy->var()->slot() != NULL && 1117 proxy->var()->slot() != NULL &&
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
1332 true_label_ = saved_true; 1334 true_label_ = saved_true;
1333 false_label_ = saved_false; 1335 false_label_ = saved_false;
1334 // Convert current context to test context: End post-test code. 1336 // Convert current context to test context: End post-test code.
1335 } 1337 }
1336 1338
1337 1339
1338 #undef __ 1340 #undef __
1339 1341
1340 1342
1341 } } // namespace v8::internal 1343 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ia32/fast-codegen-ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698