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

Unified Diff: src/codegen-arm.cc

Issue 7420: No more failures than before. It is ready to be reviewed. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 12 years, 2 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/codegen-arm.h ('k') | src/ic-arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codegen-arm.cc
===================================================================
--- src/codegen-arm.cc (revision 542)
+++ src/codegen-arm.cc (working copy)
@@ -415,6 +415,13 @@
}
+void CodeGenerator::LoadGlobalReceiver(Register s) {
+ __ ldr(s, ContextOperand(cp, Context::GLOBAL_INDEX));
+ __ ldr(s, FieldMemOperand(s, GlobalObject::kGlobalReceiverOffset));
+ __ push(s);
+}
+
+
// TODO(1241834): Get rid of this function in favor of just using Load, now
// that we have the INSIDE_TYPEOF typeof state. => Need to handle global
// variables w/o reference errors elsewhere.
@@ -2220,8 +2227,11 @@
// Push the name of the function and the receiver onto the stack.
__ mov(r0, Operand(var->name()));
__ push(r0);
- LoadGlobal();
+ // TODO(120): use JSGlobalObject for function lookup and inline cache,
+ // and use global proxy as 'this' for invocation.
+ LoadGlobalReceiver(r0);
+
// Load the arguments.
for (int i = 0; i < args->length(); i++) Load(args->at(i));
@@ -2308,7 +2318,10 @@
// Load the function.
Load(function);
// Pass the global object as the receiver.
- LoadGlobal();
+
+ // TODO(120): use JSGlobalObject for function lookup and inline cache,
+ // and use global proxy as 'this' for invocation.
+ LoadGlobalReceiver(r0);
// Call the function.
CallWithArguments(args, node->position());
__ push(r0);
@@ -2328,7 +2341,7 @@
// Compute function to call and use the global object as the
// receiver.
Load(node->expression());
- LoadGlobal();
+ LoadGlobalReceiver(r0);
// Push the arguments ("left-to-right") on the stack.
ZoneList<Expression*>* args = node->arguments();
@@ -2873,12 +2886,11 @@
// inlining a null check instead of calling the (very) general
// runtime routine for checking equality.
- bool left_is_null =
- left->AsLiteral() != NULL && left->AsLiteral()->IsNull();
- bool right_is_null =
- right->AsLiteral() != NULL && right->AsLiteral()->IsNull();
-
if (op == Token::EQ || op == Token::EQ_STRICT) {
+ bool left_is_null =
+ left->AsLiteral() != NULL && left->AsLiteral()->IsNull();
+ bool right_is_null =
+ right->AsLiteral() != NULL && right->AsLiteral()->IsNull();
// The 'null' value is only equal to 'null' or 'undefined'.
if (left_is_null || right_is_null) {
Load(left_is_null ? right : left);
« no previous file with comments | « src/codegen-arm.h ('k') | src/ic-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698