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

Side by Side Diff: src/hydrogen.h

Issue 18712002: Convert UnaryOpStub to a HydrogenCodeStub (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: fix builtin leakage Created 7 years, 5 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 1060 matching lines...) Expand 10 before | Expand all | Expand 10 after
1071 HStoreNamedField* AddStore( 1071 HStoreNamedField* AddStore(
1072 HValue *object, 1072 HValue *object,
1073 HObjectAccess access, 1073 HObjectAccess access,
1074 HValue *val, 1074 HValue *val,
1075 Representation representation = Representation::Tagged()); 1075 Representation representation = Representation::Tagged());
1076 1076
1077 HStoreNamedField* AddStoreMapConstant(HValue *object, Handle<Map>); 1077 HStoreNamedField* AddStoreMapConstant(HValue *object, Handle<Map>);
1078 1078
1079 HLoadNamedField* AddLoadElements(HValue *object, HValue *typecheck = NULL); 1079 HLoadNamedField* AddLoadElements(HValue *object, HValue *typecheck = NULL);
1080 1080
1081 HValue* LoadJSBuiltin(Builtins::JavaScript builtin, HContext* context);
1082
1083 void AddSoftDeoptimize();
1084
1081 class IfBuilder { 1085 class IfBuilder {
1082 public: 1086 public:
1083 explicit IfBuilder(HGraphBuilder* builder, 1087 explicit IfBuilder(HGraphBuilder* builder,
1084 int position = RelocInfo::kNoPosition); 1088 int position = RelocInfo::kNoPosition);
1085 IfBuilder(HGraphBuilder* builder, 1089 IfBuilder(HGraphBuilder* builder,
1086 HIfContinuation* continuation); 1090 HIfContinuation* continuation);
1087 1091
1088 ~IfBuilder() { 1092 ~IfBuilder() {
1089 if (!finished_) End(); 1093 if (!finished_) End();
1090 } 1094 }
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
1353 ElementsKind to_elements_kind, 1357 ElementsKind to_elements_kind,
1354 HValue* length, 1358 HValue* length,
1355 HValue* capacity); 1359 HValue* capacity);
1356 1360
1357 HValue* BuildCloneShallowArray(HContext* context, 1361 HValue* BuildCloneShallowArray(HContext* context,
1358 HValue* boilerplate, 1362 HValue* boilerplate,
1359 AllocationSiteMode mode, 1363 AllocationSiteMode mode,
1360 ElementsKind kind, 1364 ElementsKind kind,
1361 int length); 1365 int length);
1362 1366
1367 HInstruction* BuildUnaryMathOp(
1368 HValue* value, Handle<Type> type, Token::Value token);
1369
1363 void BuildCompareNil( 1370 void BuildCompareNil(
1364 HValue* value, 1371 HValue* value,
1365 Handle<Type> type, 1372 Handle<Type> type,
1366 int position, 1373 int position,
1367 HIfContinuation* continuation); 1374 HIfContinuation* continuation);
1368 1375
1369 HValue* BuildCreateAllocationSiteInfo(HValue* previous_object, 1376 HValue* BuildCreateAllocationSiteInfo(HValue* previous_object,
1370 int previous_object_size, 1377 int previous_object_size,
1371 HValue* payload); 1378 HValue* payload);
1372 1379
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
1440 explicit HOptimizedGraphBuilder(CompilationInfo* info); 1447 explicit HOptimizedGraphBuilder(CompilationInfo* info);
1441 1448
1442 virtual bool BuildGraph(); 1449 virtual bool BuildGraph();
1443 1450
1444 // Simple accessors. 1451 // Simple accessors.
1445 BreakAndContinueScope* break_scope() const { return break_scope_; } 1452 BreakAndContinueScope* break_scope() const { return break_scope_; }
1446 void set_break_scope(BreakAndContinueScope* head) { break_scope_ = head; } 1453 void set_break_scope(BreakAndContinueScope* head) { break_scope_ = head; }
1447 1454
1448 bool inline_bailout() { return inline_bailout_; } 1455 bool inline_bailout() { return inline_bailout_; }
1449 1456
1450 void AddSoftDeoptimize();
1451
1452 void Bailout(const char* reason); 1457 void Bailout(const char* reason);
1453 1458
1454 HBasicBlock* CreateJoin(HBasicBlock* first, 1459 HBasicBlock* CreateJoin(HBasicBlock* first,
1455 HBasicBlock* second, 1460 HBasicBlock* second,
1456 BailoutId join_id); 1461 BailoutId join_id);
1457 1462
1458 FunctionState* function_state() const { return function_state_; } 1463 FunctionState* function_state() const { return function_state_; }
1459 1464
1460 void VisitDeclarations(ZoneList<Declaration*>* declarations); 1465 void VisitDeclarations(ZoneList<Declaration*>* declarations);
1461 1466
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
1625 void VisitExpressions(ZoneList<Expression*>* exprs); 1630 void VisitExpressions(ZoneList<Expression*>* exprs);
1626 1631
1627 void AddPhi(HPhi* phi); 1632 void AddPhi(HPhi* phi);
1628 1633
1629 void PushAndAdd(HInstruction* instr); 1634 void PushAndAdd(HInstruction* instr);
1630 1635
1631 // Remove the arguments from the bailout environment and emit instructions 1636 // Remove the arguments from the bailout environment and emit instructions
1632 // to push them as outgoing parameters. 1637 // to push them as outgoing parameters.
1633 template <class Instruction> HInstruction* PreProcessCall(Instruction* call); 1638 template <class Instruction> HInstruction* PreProcessCall(Instruction* call);
1634 1639
1635 static Representation ToRepresentation(TypeInfo info);
1636 static Representation ToRepresentation(Handle<Type> type);
1637
1638 void SetUpScope(Scope* scope); 1640 void SetUpScope(Scope* scope);
1639 virtual void VisitStatements(ZoneList<Statement*>* statements); 1641 virtual void VisitStatements(ZoneList<Statement*>* statements);
1640 1642
1641 #define DECLARE_VISIT(type) virtual void Visit##type(type* node); 1643 #define DECLARE_VISIT(type) virtual void Visit##type(type* node);
1642 AST_NODE_LIST(DECLARE_VISIT) 1644 AST_NODE_LIST(DECLARE_VISIT)
1643 #undef DECLARE_VISIT 1645 #undef DECLARE_VISIT
1644 1646
1645 // Helpers for flow graph construction. 1647 // Helpers for flow graph construction.
1646 enum GlobalPropertyAccess { 1648 enum GlobalPropertyAccess {
1647 kUseCell, 1649 kUseCell,
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
2051 EmbeddedVector<char, 64> filename_; 2053 EmbeddedVector<char, 64> filename_;
2052 HeapStringAllocator string_allocator_; 2054 HeapStringAllocator string_allocator_;
2053 StringStream trace_; 2055 StringStream trace_;
2054 int indent_; 2056 int indent_;
2055 }; 2057 };
2056 2058
2057 2059
2058 } } // namespace v8::internal 2060 } } // namespace v8::internal
2059 2061
2060 #endif // V8_HYDROGEN_H_ 2062 #endif // V8_HYDROGEN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698