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

Side by Side Diff: src/hydrogen.h

Issue 18503006: Move representation into HObjectAccess and remove from HLoadNamedField and HStoreNamedField. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Pass elements kind to HObjectAccess::ForArrayLength 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
« no previous file with comments | « src/code-stubs-hydrogen.cc ('k') | src/hydrogen.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 1060 matching lines...) Expand 10 before | Expand all | Expand 10 after
1071 HCheckMaps* mapcheck, 1071 HCheckMaps* mapcheck,
1072 bool is_js_array, 1072 bool is_js_array,
1073 ElementsKind elements_kind, 1073 ElementsKind elements_kind,
1074 bool is_store, 1074 bool is_store,
1075 LoadKeyedHoleMode load_mode, 1075 LoadKeyedHoleMode load_mode,
1076 KeyedAccessStoreMode store_mode); 1076 KeyedAccessStoreMode store_mode);
1077 1077
1078 HLoadNamedField* AddLoad( 1078 HLoadNamedField* AddLoad(
1079 HValue *object, 1079 HValue *object,
1080 HObjectAccess access, 1080 HObjectAccess access,
1081 HValue *typecheck = NULL, 1081 HValue *typecheck = NULL);
1082 Representation representation = Representation::Tagged());
1083 1082
1084 HLoadNamedField* BuildLoadNamedField( 1083 HLoadNamedField* BuildLoadNamedField(
1085 HValue* object, 1084 HValue* object,
1086 HObjectAccess access, 1085 HObjectAccess access,
1087 Representation representation); 1086 Representation representation);
1088 1087
1089 HInstruction* AddExternalArrayElementAccess( 1088 HInstruction* AddExternalArrayElementAccess(
1090 HValue* external_elements, 1089 HValue* external_elements,
1091 HValue* checked_key, 1090 HValue* checked_key,
1092 HValue* val, 1091 HValue* val,
1093 HValue* dependency, 1092 HValue* dependency,
1094 ElementsKind elements_kind, 1093 ElementsKind elements_kind,
1095 bool is_store); 1094 bool is_store);
1096 1095
1097 HInstruction* AddFastElementAccess( 1096 HInstruction* AddFastElementAccess(
1098 HValue* elements, 1097 HValue* elements,
1099 HValue* checked_key, 1098 HValue* checked_key,
1100 HValue* val, 1099 HValue* val,
1101 HValue* dependency, 1100 HValue* dependency,
1102 ElementsKind elements_kind, 1101 ElementsKind elements_kind,
1103 bool is_store, 1102 bool is_store,
1104 LoadKeyedHoleMode load_mode, 1103 LoadKeyedHoleMode load_mode,
1105 KeyedAccessStoreMode store_mode); 1104 KeyedAccessStoreMode store_mode);
1106 1105
1107 HStoreNamedField* AddStore( 1106 HLoadNamedField* BuildLoadNamedField(HValue* object, HObjectAccess access);
1108 HValue *object, 1107 HStoreNamedField* AddStore(HValue *object, HObjectAccess access, HValue *val);
1109 HObjectAccess access,
1110 HValue *val,
1111 Representation representation = Representation::Tagged());
1112
1113 HStoreNamedField* AddStoreMapConstant(HValue *object, Handle<Map>); 1108 HStoreNamedField* AddStoreMapConstant(HValue *object, Handle<Map>);
1114
1115 HLoadNamedField* AddLoadElements(HValue *object, HValue *typecheck = NULL); 1109 HLoadNamedField* AddLoadElements(HValue *object, HValue *typecheck = NULL);
1116
1117 HLoadNamedField* AddLoadFixedArrayLength(HValue *object); 1110 HLoadNamedField* AddLoadFixedArrayLength(HValue *object);
1118 1111
1119 HValue* AddLoadJSBuiltin(Builtins::JavaScript builtin, HValue* context); 1112 HValue* AddLoadJSBuiltin(Builtins::JavaScript builtin, HValue* context);
1120 1113
1121 HValue* TruncateToNumber(HValue* value, Handle<Type>* expected); 1114 HValue* TruncateToNumber(HValue* value, Handle<Type>* expected);
1122 1115
1123 void PushAndAdd(HInstruction* instr); 1116 void PushAndAdd(HInstruction* instr);
1124 1117
1125 enum SoftDeoptimizeMode { 1118 enum SoftDeoptimizeMode {
1126 MUST_EMIT_SOFT_DEOPT, 1119 MUST_EMIT_SOFT_DEOPT,
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
1370 ElementsKind kind, 1363 ElementsKind kind,
1371 HValue* capacity); 1364 HValue* capacity);
1372 1365
1373 // array must have been allocated with enough room for 1366 // array must have been allocated with enough room for
1374 // 1) the JSArray, 2) a AllocationMemento if mode requires it, 1367 // 1) the JSArray, 2) a AllocationMemento if mode requires it,
1375 // 3) a FixedArray or FixedDoubleArray. 1368 // 3) a FixedArray or FixedDoubleArray.
1376 // A pointer to the Fixed(Double)Array is returned. 1369 // A pointer to the Fixed(Double)Array is returned.
1377 HInnerAllocatedObject* BuildJSArrayHeader(HValue* array, 1370 HInnerAllocatedObject* BuildJSArrayHeader(HValue* array,
1378 HValue* array_map, 1371 HValue* array_map,
1379 AllocationSiteMode mode, 1372 AllocationSiteMode mode,
1373 ElementsKind elements_kind,
1380 HValue* allocation_site_payload, 1374 HValue* allocation_site_payload,
1381 HValue* length_field); 1375 HValue* length_field);
1382 1376
1383 HValue* BuildGrowElementsCapacity(HValue* object, 1377 HValue* BuildGrowElementsCapacity(HValue* object,
1384 HValue* elements, 1378 HValue* elements,
1385 ElementsKind kind, 1379 ElementsKind kind,
1386 ElementsKind new_kind, 1380 ElementsKind new_kind,
1387 HValue* length, 1381 HValue* length,
1388 HValue* new_capacity); 1382 HValue* new_capacity);
1389 1383
(...skipping 707 matching lines...) Expand 10 before | Expand all | Expand 10 after
2097 EmbeddedVector<char, 64> filename_; 2091 EmbeddedVector<char, 64> filename_;
2098 HeapStringAllocator string_allocator_; 2092 HeapStringAllocator string_allocator_;
2099 StringStream trace_; 2093 StringStream trace_;
2100 int indent_; 2094 int indent_;
2101 }; 2095 };
2102 2096
2103 2097
2104 } } // namespace v8::internal 2098 } } // namespace v8::internal
2105 2099
2106 #endif // V8_HYDROGEN_H_ 2100 #endif // V8_HYDROGEN_H_
OLDNEW
« no previous file with comments | « src/code-stubs-hydrogen.cc ('k') | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698