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

Side by Side Diff: src/arm/fast-codegen-arm.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 | « no previous file | src/ia32/fast-codegen-ia32.cc » ('j') | 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 1013 matching lines...) Expand 10 before | Expand all | Expand 10 after
1024 true_label_ = saved_true; 1024 true_label_ = saved_true;
1025 false_label_ = saved_false; 1025 false_label_ = saved_false;
1026 break; 1026 break;
1027 } 1027 }
1028 1028
1029 case Token::TYPEOF: { 1029 case Token::TYPEOF: {
1030 Comment cmnt(masm_, "[ UnaryOperation (TYPEOF)"); 1030 Comment cmnt(masm_, "[ UnaryOperation (TYPEOF)");
1031 ASSERT_EQ(Expression::kValue, expr->expression()->context()); 1031 ASSERT_EQ(Expression::kValue, expr->expression()->context());
1032 1032
1033 VariableProxy* proxy = expr->expression()->AsVariableProxy(); 1033 VariableProxy* proxy = expr->expression()->AsVariableProxy();
1034 if (proxy != NULL && proxy->var()->is_global()) { 1034 if (proxy != NULL &&
1035 !proxy->var()->is_this() &&
1036 proxy->var()->is_global()) {
1035 Comment cmnt(masm_, "Global variable"); 1037 Comment cmnt(masm_, "Global variable");
1036 __ ldr(r0, CodeGenerator::GlobalObject()); 1038 __ ldr(r0, CodeGenerator::GlobalObject());
1037 __ push(r0); 1039 __ push(r0);
1038 __ mov(r2, Operand(proxy->name())); 1040 __ mov(r2, Operand(proxy->name()));
1039 Handle<Code> ic(Builtins::builtin(Builtins::LoadIC_Initialize)); 1041 Handle<Code> ic(Builtins::builtin(Builtins::LoadIC_Initialize));
1040 // Use a regular load, not a contextual load, to avoid a reference 1042 // Use a regular load, not a contextual load, to avoid a reference
1041 // error. 1043 // error.
1042 __ Call(ic, RelocInfo::CODE_TARGET); 1044 __ Call(ic, RelocInfo::CODE_TARGET);
1043 __ str(r0, MemOperand(sp)); 1045 __ str(r0, MemOperand(sp));
1044 } else if (proxy != NULL && 1046 } else if (proxy != NULL &&
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
1345 true_label_ = saved_true; 1347 true_label_ = saved_true;
1346 false_label_ = saved_false; 1348 false_label_ = saved_false;
1347 // Convert current context to test context: End post-test code. 1349 // Convert current context to test context: End post-test code.
1348 } 1350 }
1349 1351
1350 1352
1351 #undef __ 1353 #undef __
1352 1354
1353 1355
1354 } } // namespace v8::internal 1356 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/ia32/fast-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698