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

Side by Side Diff: src/code-stubs.h

Issue 12490013: Deoptimizer support for hydrogen stubs that accept a variable number of arguments. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 2nd review feedback addressed Created 7 years, 8 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
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 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 252
253 virtual int GetCodeKind() { return Code::STUB; } 253 virtual int GetCodeKind() { return Code::STUB; }
254 virtual int GetStubFlags() { return -1; } 254 virtual int GetStubFlags() { return -1; }
255 255
256 protected: 256 protected:
257 // Generates the assembler code for the stub. 257 // Generates the assembler code for the stub.
258 virtual void Generate(MacroAssembler* masm) = 0; 258 virtual void Generate(MacroAssembler* masm) = 0;
259 }; 259 };
260 260
261 261
262 enum StubFunctionMode { NOT_JS_FUNCTION_MODE, JS_FUNCTION_MODE };
danno 2013/04/02 10:39:44 How about NOT_JS_FUNCTION_STUB_MODE and JS_FUNCTIO
mvstanton 2013/04/02 11:27:25 Done.
263
262 struct CodeStubInterfaceDescriptor { 264 struct CodeStubInterfaceDescriptor {
263 CodeStubInterfaceDescriptor() 265 CodeStubInterfaceDescriptor()
264 : register_param_count_(-1), 266 : register_param_count_(-1),
265 stack_parameter_count_(NULL), 267 stack_parameter_count_(NULL),
266 extra_expression_stack_count_(0), 268 function_mode_(NOT_JS_FUNCTION_MODE),
267 register_params_(NULL) { } 269 register_params_(NULL) { }
268 int register_param_count_; 270 int register_param_count_;
269 const Register* stack_parameter_count_; 271 const Register* stack_parameter_count_;
270 int extra_expression_stack_count_; 272 StubFunctionMode function_mode_;
271 Register* register_params_; 273 Register* register_params_;
272 Address deoptimization_handler_; 274 Address deoptimization_handler_;
273 275
274 int environment_length() const { 276 int environment_length() const {
275 if (stack_parameter_count_ != NULL) { 277 if (stack_parameter_count_ != NULL) {
276 return register_param_count_ + 1; 278 return register_param_count_ + 1;
277 } 279 }
278 return register_param_count_; 280 return register_param_count_;
279 } 281 }
280 }; 282 };
(...skipping 1282 matching lines...) Expand 10 before | Expand all | Expand 10 after
1563 void Generate(MacroAssembler* masm); 1565 void Generate(MacroAssembler* masm);
1564 1566
1565 bool fp_registers_; 1567 bool fp_registers_;
1566 1568
1567 DISALLOW_COPY_AND_ASSIGN(StoreArrayLiteralElementStub); 1569 DISALLOW_COPY_AND_ASSIGN(StoreArrayLiteralElementStub);
1568 }; 1570 };
1569 1571
1570 1572
1571 class StubFailureTrampolineStub : public PlatformCodeStub { 1573 class StubFailureTrampolineStub : public PlatformCodeStub {
1572 public: 1574 public:
1573 static const int kMaxExtraExpressionStackCount = 1; 1575 explicit StubFailureTrampolineStub(StubFunctionMode function_mode)
1574 1576 : function_mode_(function_mode) {}
1575 explicit StubFailureTrampolineStub(int extra_expression_stack_count)
1576 : extra_expression_stack_count_(extra_expression_stack_count) {}
1577 1577
1578 virtual bool IsPregenerated() { return true; } 1578 virtual bool IsPregenerated() { return true; }
1579 1579
1580 static void GenerateAheadOfTime(Isolate* isolate); 1580 static void GenerateAheadOfTime(Isolate* isolate);
1581 1581
1582 private: 1582 private:
1583 Major MajorKey() { return StubFailureTrampoline; } 1583 Major MajorKey() { return StubFailureTrampoline; }
1584 int MinorKey() { return extra_expression_stack_count_; } 1584 int MinorKey() { return static_cast<int>(function_mode_); }
1585 1585
1586 void Generate(MacroAssembler* masm); 1586 void Generate(MacroAssembler* masm);
1587 1587
1588 int extra_expression_stack_count_; 1588 StubFunctionMode function_mode_;
1589 1589
1590 DISALLOW_COPY_AND_ASSIGN(StubFailureTrampolineStub); 1590 DISALLOW_COPY_AND_ASSIGN(StubFailureTrampolineStub);
1591 }; 1591 };
1592 1592
1593 1593
1594 class ProfileEntryHookStub : public PlatformCodeStub { 1594 class ProfileEntryHookStub : public PlatformCodeStub {
1595 public: 1595 public:
1596 explicit ProfileEntryHookStub() {} 1596 explicit ProfileEntryHookStub() {}
1597 1597
1598 // The profile entry hook function is not allowed to cause a GC. 1598 // The profile entry hook function is not allowed to cause a GC.
(...skipping 20 matching lines...) Expand all
1619 1619
1620 // The current function entry hook. 1620 // The current function entry hook.
1621 static FunctionEntryHook entry_hook_; 1621 static FunctionEntryHook entry_hook_;
1622 1622
1623 DISALLOW_COPY_AND_ASSIGN(ProfileEntryHookStub); 1623 DISALLOW_COPY_AND_ASSIGN(ProfileEntryHookStub);
1624 }; 1624 };
1625 1625
1626 } } // namespace v8::internal 1626 } } // namespace v8::internal
1627 1627
1628 #endif // V8_CODE_STUBS_H_ 1628 #endif // V8_CODE_STUBS_H_
OLDNEW
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/code-stubs.cc » ('j') | src/code-stubs-hydrogen.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698