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

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

Issue 148223002: Remove CallICs (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Update test262 status file Created 6 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/hydrogen.cc ('k') | src/ia32/code-stubs-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 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 1937 matching lines...) Expand 10 before | Expand all | Expand 10 after
1948 HStackCheck(HValue* context, Type type) : type_(type) { 1948 HStackCheck(HValue* context, Type type) : type_(type) {
1949 SetOperandAt(0, context); 1949 SetOperandAt(0, context);
1950 SetGVNFlag(kChangesNewSpacePromotion); 1950 SetGVNFlag(kChangesNewSpacePromotion);
1951 } 1951 }
1952 1952
1953 Type type_; 1953 Type type_;
1954 }; 1954 };
1955 1955
1956 1956
1957 enum InliningKind { 1957 enum InliningKind {
1958 NORMAL_RETURN, // Normal function/method call and return. 1958 NORMAL_RETURN, // Drop the function from the environment on return.
1959 DROP_EXTRA_ON_RETURN, // Drop an extra value from the environment on return.
1960 CONSTRUCT_CALL_RETURN, // Either use allocated receiver or return value. 1959 CONSTRUCT_CALL_RETURN, // Either use allocated receiver or return value.
1961 GETTER_CALL_RETURN, // Returning from a getter, need to restore context. 1960 GETTER_CALL_RETURN, // Returning from a getter, need to restore context.
1962 SETTER_CALL_RETURN // Use the RHS of the assignment as the return value. 1961 SETTER_CALL_RETURN // Use the RHS of the assignment as the return value.
1963 }; 1962 };
1964 1963
1965 1964
1966 class HArgumentsObject; 1965 class HArgumentsObject;
1967 1966
1968 1967
1969 class HEnterInlined V8_FINAL : public HTemplateInstruction<0> { 1968 class HEnterInlined V8_FINAL : public HTemplateInstruction<0> {
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
2366 : HBinaryCall(context, function, argument_count), 2365 : HBinaryCall(context, function, argument_count),
2367 has_stack_check_(false) { 2366 has_stack_check_(false) {
2368 } 2367 }
2369 2368
2370 Handle<JSFunction> known_function_; 2369 Handle<JSFunction> known_function_;
2371 int formal_parameter_count_; 2370 int formal_parameter_count_;
2372 bool has_stack_check_; 2371 bool has_stack_check_;
2373 }; 2372 };
2374 2373
2375 2374
2376 enum CallMode {
2377 NORMAL_CALL,
2378 TAIL_CALL,
2379 NORMAL_CONTEXTUAL_CALL
2380 };
2381
2382
2383 class HCallFunction V8_FINAL : public HBinaryCall { 2375 class HCallFunction V8_FINAL : public HBinaryCall {
2384 public: 2376 public:
2385 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P2(HCallFunction, HValue*, int); 2377 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P2(HCallFunction, HValue*, int);
2386 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P3( 2378 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P3(
2387 HCallFunction, HValue*, int, CallMode); 2379 HCallFunction, HValue*, int, CallFunctionFlags);
2388 2380
2389 bool IsTailCall() const { return call_mode_ == TAIL_CALL; }
2390 bool IsContextualCall() const { return call_mode_ == NORMAL_CONTEXTUAL_CALL; }
2391 HValue* context() { return first(); } 2381 HValue* context() { return first(); }
2392 HValue* function() { return second(); } 2382 HValue* function() { return second(); }
2383 CallFunctionFlags function_flags() const { return function_flags_; }
2393 2384
2394 DECLARE_CONCRETE_INSTRUCTION(CallFunction) 2385 DECLARE_CONCRETE_INSTRUCTION(CallFunction)
2395 2386
2396 virtual int argument_delta() const V8_OVERRIDE { 2387 virtual int argument_delta() const V8_OVERRIDE { return -argument_count(); }
2397 if (IsTailCall()) return 0;
2398 return -argument_count();
2399 }
2400 2388
2401 private: 2389 private:
2402 HCallFunction(HValue* context, 2390 HCallFunction(HValue* context,
2403 HValue* function, 2391 HValue* function,
2404 int argument_count, 2392 int argument_count,
2405 CallMode mode = NORMAL_CALL) 2393 CallFunctionFlags flags = NO_CALL_FUNCTION_FLAGS)
2406 : HBinaryCall(context, function, argument_count), call_mode_(mode) { 2394 : HBinaryCall(context, function, argument_count), function_flags_(flags) {
2407 } 2395 }
2408 CallMode call_mode_; 2396 CallFunctionFlags function_flags_;
2409 }; 2397 };
2410 2398
2411 2399
2412 class HCallNew V8_FINAL : public HBinaryCall { 2400 class HCallNew V8_FINAL : public HBinaryCall {
2413 public: 2401 public:
2414 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P2(HCallNew, HValue*, int); 2402 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P2(HCallNew, HValue*, int);
2415 2403
2416 HValue* context() { return first(); } 2404 HValue* context() { return first(); }
2417 HValue* constructor() { return second(); } 2405 HValue* constructor() { return second(); }
2418 2406
(...skipping 4973 matching lines...) Expand 10 before | Expand all | Expand 10 after
7392 virtual bool IsDeletable() const V8_OVERRIDE { return true; } 7380 virtual bool IsDeletable() const V8_OVERRIDE { return true; }
7393 }; 7381 };
7394 7382
7395 7383
7396 #undef DECLARE_INSTRUCTION 7384 #undef DECLARE_INSTRUCTION
7397 #undef DECLARE_CONCRETE_INSTRUCTION 7385 #undef DECLARE_CONCRETE_INSTRUCTION
7398 7386
7399 } } // namespace v8::internal 7387 } } // namespace v8::internal
7400 7388
7401 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 7389 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« no previous file with comments | « src/hydrogen.cc ('k') | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698