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

Side by Side Diff: src/hydrogen-instructions.h

Issue 111613003: Load the global proxy from the context of the target function. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: don't embed global object or receiver in hydrogen Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 2381 matching lines...) Expand 10 before | Expand all | Expand 10 after
2392 HCallNamed(HValue* context, Handle<String> name, int argument_count) 2392 HCallNamed(HValue* context, Handle<String> name, int argument_count)
2393 : HUnaryCall(context, argument_count), name_(name) { 2393 : HUnaryCall(context, argument_count), name_(name) {
2394 } 2394 }
2395 2395
2396 Handle<String> name_; 2396 Handle<String> name_;
2397 }; 2397 };
2398 2398
2399 2399
2400 enum CallMode { 2400 enum CallMode {
2401 NORMAL_CALL, 2401 NORMAL_CALL,
2402 TAIL_CALL 2402 TAIL_CALL,
2403 NORMAL_CONTEXTUAL_CALL
2403 }; 2404 };
2404 2405
2405 2406
2406 class HCallFunction V8_FINAL : public HBinaryCall { 2407 class HCallFunction V8_FINAL : public HBinaryCall {
2407 public: 2408 public:
2408 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P2(HCallFunction, HValue*, int); 2409 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P2(HCallFunction, HValue*, int);
2409 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P3( 2410 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P3(
2410 HCallFunction, HValue*, int, CallMode); 2411 HCallFunction, HValue*, int, CallMode);
2411 2412
2412 bool IsTailCall() const { return call_mode_ == TAIL_CALL; } 2413 bool IsTailCall() const { return call_mode_ == TAIL_CALL; }
2413 2414 bool IsContextualCall() const { return call_mode_ == NORMAL_CONTEXTUAL_CALL; }
2414 HValue* context() { return first(); } 2415 HValue* context() { return first(); }
2415 HValue* function() { return second(); } 2416 HValue* function() { return second(); }
2416 2417
2417 DECLARE_CONCRETE_INSTRUCTION(CallFunction) 2418 DECLARE_CONCRETE_INSTRUCTION(CallFunction)
2418 2419
2419 virtual int argument_delta() const V8_OVERRIDE { 2420 virtual int argument_delta() const V8_OVERRIDE {
2420 if (IsTailCall()) return 0; 2421 if (IsTailCall()) return 0;
2421 return -argument_count(); 2422 return -argument_count();
2422 } 2423 }
2423 2424
(...skipping 5056 matching lines...) Expand 10 before | Expand all | Expand 10 after
7480 virtual bool IsDeletable() const V8_OVERRIDE { return true; } 7481 virtual bool IsDeletable() const V8_OVERRIDE { return true; }
7481 }; 7482 };
7482 7483
7483 7484
7484 #undef DECLARE_INSTRUCTION 7485 #undef DECLARE_INSTRUCTION
7485 #undef DECLARE_CONCRETE_INSTRUCTION 7486 #undef DECLARE_CONCRETE_INSTRUCTION
7486 7487
7487 } } // namespace v8::internal 7488 } } // namespace v8::internal
7488 7489
7489 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 7490 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698