OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "v8.h" | 5 #include "v8.h" |
6 | 6 |
7 #include "code-stubs.h" | 7 #include "code-stubs.h" |
8 #include "hydrogen.h" | 8 #include "hydrogen.h" |
9 #include "lithium.h" | 9 #include "lithium.h" |
10 | 10 |
(...skipping 1024 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1035 isolate()->factory()->NewPropertyCell(placeholer_value); | 1035 isolate()->factory()->NewPropertyCell(placeholer_value); |
1036 | 1036 |
1037 HParameter* value = GetParameter(2); | 1037 HParameter* value = GetParameter(2); |
1038 | 1038 |
1039 if (stub->check_global()) { | 1039 if (stub->check_global()) { |
1040 // Check that the map of the global has not changed: use a placeholder map | 1040 // Check that the map of the global has not changed: use a placeholder map |
1041 // that will be replaced later with the global object's map. | 1041 // that will be replaced later with the global object's map. |
1042 Handle<Map> placeholder_map = isolate()->factory()->meta_map(); | 1042 Handle<Map> placeholder_map = isolate()->factory()->meta_map(); |
1043 HValue* global = Add<HConstant>( | 1043 HValue* global = Add<HConstant>( |
1044 StoreGlobalStub::global_placeholder(isolate())); | 1044 StoreGlobalStub::global_placeholder(isolate())); |
1045 Add<HCheckMaps>(global, placeholder_map, top_info()); | 1045 Add<HCheckMaps>(global, placeholder_map); |
1046 } | 1046 } |
1047 | 1047 |
1048 HValue* cell = Add<HConstant>(placeholder_cell); | 1048 HValue* cell = Add<HConstant>(placeholder_cell); |
1049 HObjectAccess access(HObjectAccess::ForCellPayload(isolate())); | 1049 HObjectAccess access(HObjectAccess::ForCellPayload(isolate())); |
1050 HValue* cell_contents = Add<HLoadNamedField>( | 1050 HValue* cell_contents = Add<HLoadNamedField>( |
1051 cell, static_cast<HValue*>(NULL), access); | 1051 cell, static_cast<HValue*>(NULL), access); |
1052 | 1052 |
1053 if (stub->is_constant()) { | 1053 if (stub->is_constant()) { |
1054 IfBuilder builder(this); | 1054 IfBuilder builder(this); |
1055 builder.If<HCompareObjectEqAndBranch>(cell_contents, value); | 1055 builder.If<HCompareObjectEqAndBranch>(cell_contents, value); |
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1404 return BuildRegExpConstructResult(length, index, input); | 1404 return BuildRegExpConstructResult(length, index, input); |
1405 } | 1405 } |
1406 | 1406 |
1407 | 1407 |
1408 Handle<Code> RegExpConstructResultStub::GenerateCode() { | 1408 Handle<Code> RegExpConstructResultStub::GenerateCode() { |
1409 return DoGenerateCode(this); | 1409 return DoGenerateCode(this); |
1410 } | 1410 } |
1411 | 1411 |
1412 | 1412 |
1413 } } // namespace v8::internal | 1413 } } // namespace v8::internal |
OLD | NEW |