OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
500 StrictModeFlag strict_mode) { | 500 StrictModeFlag strict_mode) { |
501 if (object->HasExternalArrayElements()) { | 501 if (object->HasExternalArrayElements()) { |
502 if (!value->IsSmi() && !value->IsHeapNumber() && !value->IsUndefined()) { | 502 if (!value->IsSmi() && !value->IsHeapNumber() && !value->IsUndefined()) { |
503 bool has_exception; | 503 bool has_exception; |
504 Handle<Object> number = Execution::ToNumber(value, &has_exception); | 504 Handle<Object> number = Execution::ToNumber(value, &has_exception); |
505 if (has_exception) return Handle<Object>(); | 505 if (has_exception) return Handle<Object>(); |
506 value = number; | 506 value = number; |
507 } | 507 } |
508 } | 508 } |
509 CALL_HEAP_FUNCTION(object->GetIsolate(), | 509 CALL_HEAP_FUNCTION(object->GetIsolate(), |
510 object->SetElement(index, *value, strict_mode), Object); | 510 object->SetElement(index, *value, strict_mode, true), |
| 511 Object); |
511 } | 512 } |
512 | 513 |
513 | 514 |
514 Handle<Object> SetOwnElement(Handle<JSObject> object, | 515 Handle<Object> SetOwnElement(Handle<JSObject> object, |
515 uint32_t index, | 516 uint32_t index, |
516 Handle<Object> value, | 517 Handle<Object> value, |
517 StrictModeFlag strict_mode) { | 518 StrictModeFlag strict_mode) { |
518 ASSERT(!object->HasExternalArrayElements()); | 519 ASSERT(!object->HasExternalArrayElements()); |
519 CALL_HEAP_FUNCTION(object->GetIsolate(), | 520 CALL_HEAP_FUNCTION(object->GetIsolate(), |
520 object->SetElement(index, *value, strict_mode, false), | 521 object->SetElement(index, *value, strict_mode, false), |
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
969 | 970 |
970 bool CompileOptimized(Handle<JSFunction> function, | 971 bool CompileOptimized(Handle<JSFunction> function, |
971 int osr_ast_id, | 972 int osr_ast_id, |
972 ClearExceptionFlag flag) { | 973 ClearExceptionFlag flag) { |
973 CompilationInfo info(function); | 974 CompilationInfo info(function); |
974 info.SetOptimizing(osr_ast_id); | 975 info.SetOptimizing(osr_ast_id); |
975 return CompileLazyHelper(&info, flag); | 976 return CompileLazyHelper(&info, flag); |
976 } | 977 } |
977 | 978 |
978 } } // namespace v8::internal | 979 } } // namespace v8::internal |
OLD | NEW |