Make "typeof this" return object in fast compiler.
Review URL: http://codereview.chromium.org/366028 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3227 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
f39fbb206e
commit
ec7034e65b
@ -1031,7 +1031,9 @@ void FastCodeGenerator::VisitUnaryOperation(UnaryOperation* expr) {
|
||||
ASSERT_EQ(Expression::kValue, expr->expression()->context());
|
||||
|
||||
VariableProxy* proxy = expr->expression()->AsVariableProxy();
|
||||
if (proxy != NULL && proxy->var()->is_global()) {
|
||||
if (proxy != NULL &&
|
||||
!proxy->var()->is_this() &&
|
||||
proxy->var()->is_global()) {
|
||||
Comment cmnt(masm_, "Global variable");
|
||||
__ ldr(r0, CodeGenerator::GlobalObject());
|
||||
__ push(r0);
|
||||
|
@ -1027,7 +1027,9 @@ void FastCodeGenerator::VisitUnaryOperation(UnaryOperation* expr) {
|
||||
ASSERT_EQ(Expression::kValue, expr->expression()->context());
|
||||
|
||||
VariableProxy* proxy = expr->expression()->AsVariableProxy();
|
||||
if (proxy != NULL && proxy->var()->is_global()) {
|
||||
if (proxy != NULL &&
|
||||
!proxy->var()->is_this() &&
|
||||
proxy->var()->is_global()) {
|
||||
Comment cmnt(masm_, "Global variable");
|
||||
__ push(CodeGenerator::GlobalObject());
|
||||
__ mov(ecx, Immediate(proxy->name()));
|
||||
|
@ -1102,7 +1102,9 @@ void FastCodeGenerator::VisitUnaryOperation(UnaryOperation* expr) {
|
||||
ASSERT_EQ(Expression::kValue, expr->expression()->context());
|
||||
|
||||
VariableProxy* proxy = expr->expression()->AsVariableProxy();
|
||||
if (proxy != NULL && proxy->var()->is_global()) {
|
||||
if (proxy != NULL &&
|
||||
!proxy->var()->is_this() &&
|
||||
proxy->var()->is_global()) {
|
||||
Comment cmnt(masm_, "Global variable");
|
||||
__ push(CodeGenerator::GlobalObject());
|
||||
__ Move(rcx, proxy->name());
|
||||
|
Loading…
Reference in New Issue
Block a user