OLD | NEW |
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 1351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1362 ElementsKind elements_kind, | 1362 ElementsKind elements_kind, |
1363 bool is_store, | 1363 bool is_store, |
1364 LoadKeyedHoleMode load_mode = NEVER_RETURN_HOLE); | 1364 LoadKeyedHoleMode load_mode = NEVER_RETURN_HOLE); |
1365 | 1365 |
1366 HLoadNamedField* BuildLoadNamedField(HValue* object, HObjectAccess access); | 1366 HLoadNamedField* BuildLoadNamedField(HValue* object, HObjectAccess access); |
1367 HInstruction* AddLoadNamedField(HValue* object, HObjectAccess access); | 1367 HInstruction* AddLoadNamedField(HValue* object, HObjectAccess access); |
1368 HInstruction* AddLoadStringInstanceType(HValue* string); | 1368 HInstruction* AddLoadStringInstanceType(HValue* string); |
1369 HInstruction* AddLoadStringLength(HValue* string); | 1369 HInstruction* AddLoadStringLength(HValue* string); |
1370 HStoreNamedField* AddStoreMapNoWriteBarrier(HValue* object, HValue* map) { | 1370 HStoreNamedField* AddStoreMapNoWriteBarrier(HValue* object, HValue* map) { |
1371 HStoreNamedField* store_map = Add<HStoreNamedField>( | 1371 HStoreNamedField* store_map = Add<HStoreNamedField>( |
1372 object, HObjectAccess::ForMap(), map, INITIALIZING_STORE); | 1372 object, HObjectAccess::ForMap(), map); |
1373 store_map->SkipWriteBarrier(); | 1373 store_map->SkipWriteBarrier(); |
1374 return store_map; | 1374 return store_map; |
1375 } | 1375 } |
1376 HStoreNamedField* AddStoreMapConstant(HValue* object, Handle<Map> map); | 1376 HStoreNamedField* AddStoreMapConstant(HValue* object, Handle<Map> map); |
1377 HStoreNamedField* AddStoreMapConstantNoWriteBarrier(HValue* object, | 1377 HStoreNamedField* AddStoreMapConstantNoWriteBarrier(HValue* object, |
1378 Handle<Map> map) { | 1378 Handle<Map> map) { |
1379 HStoreNamedField* store_map = AddStoreMapConstant(object, map); | 1379 HStoreNamedField* store_map = AddStoreMapConstant(object, map); |
1380 store_map->SkipWriteBarrier(); | 1380 store_map->SkipWriteBarrier(); |
1381 return store_map; | 1381 return store_map; |
1382 } | 1382 } |
(...skipping 920 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2303 if (IsArrayLength()) { | 2303 if (IsArrayLength()) { |
2304 *access = HObjectAccess::ForArrayLength(map()->elements_kind()); | 2304 *access = HObjectAccess::ForArrayLength(map()->elements_kind()); |
2305 return true; | 2305 return true; |
2306 } | 2306 } |
2307 int offset; | 2307 int offset; |
2308 if (Accessors::IsJSObjectFieldAccessor(type_, name_, &offset)) { | 2308 if (Accessors::IsJSObjectFieldAccessor(type_, name_, &offset)) { |
2309 if (type_->Is(HeapType::String())) { | 2309 if (type_->Is(HeapType::String())) { |
2310 ASSERT(name_->Equals(isolate()->heap()->length_string())); | 2310 ASSERT(name_->Equals(isolate()->heap()->length_string())); |
2311 *access = HObjectAccess::ForStringLength(); | 2311 *access = HObjectAccess::ForStringLength(); |
2312 } else { | 2312 } else { |
2313 *access = HObjectAccess::ForJSObjectOffset(offset); | 2313 *access = HObjectAccess::ForMapAndOffset(map(), offset); |
2314 } | 2314 } |
2315 return true; | 2315 return true; |
2316 } | 2316 } |
2317 return false; | 2317 return false; |
2318 } | 2318 } |
2319 | 2319 |
2320 bool has_holder() { return !holder_.is_null(); } | 2320 bool has_holder() { return !holder_.is_null(); } |
2321 | 2321 |
2322 LookupResult* lookup() { return &lookup_; } | 2322 LookupResult* lookup() { return &lookup_; } |
2323 Handle<JSObject> holder() { return holder_; } | 2323 Handle<JSObject> holder() { return holder_; } |
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2716 } | 2716 } |
2717 | 2717 |
2718 private: | 2718 private: |
2719 HGraphBuilder* builder_; | 2719 HGraphBuilder* builder_; |
2720 }; | 2720 }; |
2721 | 2721 |
2722 | 2722 |
2723 } } // namespace v8::internal | 2723 } } // namespace v8::internal |
2724 | 2724 |
2725 #endif // V8_HYDROGEN_H_ | 2725 #endif // V8_HYDROGEN_H_ |
OLD | NEW |