OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 1269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1280 !HConstant::cast(string)->HasStringValue()); | 1280 !HConstant::cast(string)->HasStringValue()); |
1281 BuildCheckHeapObject(string); | 1281 BuildCheckHeapObject(string); |
1282 return Add<HCheckInstanceType>(string, HCheckInstanceType::IS_STRING); | 1282 return Add<HCheckInstanceType>(string, HCheckInstanceType::IS_STRING); |
1283 } | 1283 } |
1284 return string; | 1284 return string; |
1285 } | 1285 } |
1286 | 1286 |
1287 | 1287 |
1288 HValue* HGraphBuilder::BuildWrapReceiver(HValue* object, HValue* function) { | 1288 HValue* HGraphBuilder::BuildWrapReceiver(HValue* object, HValue* function) { |
1289 if (object->type().IsJSObject()) return object; | 1289 if (object->type().IsJSObject()) return object; |
| 1290 if (function->IsConstant() && |
| 1291 HConstant::cast(function)->handle(isolate())->IsJSFunction()) { |
| 1292 Handle<JSFunction> f = Handle<JSFunction>::cast( |
| 1293 HConstant::cast(function)->handle(isolate())); |
| 1294 SharedFunctionInfo* shared = f->shared(); |
| 1295 if (!shared->is_classic_mode() || shared->native()) return object; |
| 1296 } |
1290 return Add<HWrapReceiver>(object, function); | 1297 return Add<HWrapReceiver>(object, function); |
1291 } | 1298 } |
1292 | 1299 |
1293 | 1300 |
1294 HValue* HGraphBuilder::BuildCheckForCapacityGrow(HValue* object, | 1301 HValue* HGraphBuilder::BuildCheckForCapacityGrow(HValue* object, |
1295 HValue* elements, | 1302 HValue* elements, |
1296 ElementsKind kind, | 1303 ElementsKind kind, |
1297 HValue* length, | 1304 HValue* length, |
1298 HValue* key, | 1305 HValue* key, |
1299 bool is_js_array, | 1306 bool is_js_array, |
(...skipping 10055 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11355 if (ShouldProduceTraceOutput()) { | 11362 if (ShouldProduceTraceOutput()) { |
11356 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 11363 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
11357 } | 11364 } |
11358 | 11365 |
11359 #ifdef DEBUG | 11366 #ifdef DEBUG |
11360 graph_->Verify(false); // No full verify. | 11367 graph_->Verify(false); // No full verify. |
11361 #endif | 11368 #endif |
11362 } | 11369 } |
11363 | 11370 |
11364 } } // namespace v8::internal | 11371 } } // namespace v8::internal |
OLD | NEW |