OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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 "src/runtime/runtime-utils.h" | 5 #include "src/runtime/runtime-utils.h" |
6 | 6 |
7 #include "src/arguments.h" | 7 #include "src/arguments.h" |
8 #include "src/debug/debug.h" | 8 #include "src/debug/debug.h" |
9 #include "src/debug/debug-frames.h" | 9 #include "src/debug/debug-frames.h" |
10 #include "src/debug/liveedit.h" | 10 #include "src/debug/liveedit.h" |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 USE(new_shared_array); | 207 USE(new_shared_array); |
208 RUNTIME_ASSERT(old_shared_array->length()->IsSmi()); | 208 RUNTIME_ASSERT(old_shared_array->length()->IsSmi()); |
209 RUNTIME_ASSERT(new_shared_array->length() == old_shared_array->length()); | 209 RUNTIME_ASSERT(new_shared_array->length() == old_shared_array->length()); |
210 RUNTIME_ASSERT(old_shared_array->HasFastElements()); | 210 RUNTIME_ASSERT(old_shared_array->HasFastElements()); |
211 RUNTIME_ASSERT(new_shared_array->HasFastElements()); | 211 RUNTIME_ASSERT(new_shared_array->HasFastElements()); |
212 int array_length = Smi::cast(old_shared_array->length())->value(); | 212 int array_length = Smi::cast(old_shared_array->length())->value(); |
213 for (int i = 0; i < array_length; i++) { | 213 for (int i = 0; i < array_length; i++) { |
214 Handle<Object> old_element; | 214 Handle<Object> old_element; |
215 Handle<Object> new_element; | 215 Handle<Object> new_element; |
216 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( | 216 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( |
217 isolate, old_element, Object::GetElement(isolate, old_shared_array, i)); | 217 isolate, old_element, |
| 218 JSReceiver::GetElement(isolate, old_shared_array, i)); |
218 RUNTIME_ASSERT( | 219 RUNTIME_ASSERT( |
219 old_element->IsJSValue() && | 220 old_element->IsJSValue() && |
220 Handle<JSValue>::cast(old_element)->value()->IsSharedFunctionInfo()); | 221 Handle<JSValue>::cast(old_element)->value()->IsSharedFunctionInfo()); |
221 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( | 222 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( |
222 isolate, new_element, Object::GetElement(isolate, new_shared_array, i)); | 223 isolate, new_element, |
| 224 JSReceiver::GetElement(isolate, new_shared_array, i)); |
223 RUNTIME_ASSERT( | 225 RUNTIME_ASSERT( |
224 new_element->IsUndefined() || | 226 new_element->IsUndefined() || |
225 (new_element->IsJSValue() && | 227 (new_element->IsJSValue() && |
226 Handle<JSValue>::cast(new_element)->value()->IsSharedFunctionInfo())); | 228 Handle<JSValue>::cast(new_element)->value()->IsSharedFunctionInfo())); |
227 } | 229 } |
228 | 230 |
229 return *LiveEdit::CheckAndDropActivations(old_shared_array, new_shared_array, | 231 return *LiveEdit::CheckAndDropActivations(old_shared_array, new_shared_array, |
230 do_drop); | 232 do_drop); |
231 } | 233 } |
232 | 234 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 // We don't really care what the inlined frame index is, since we are | 280 // We don't really care what the inlined frame index is, since we are |
279 // throwing away the entire frame anyways. | 281 // throwing away the entire frame anyways. |
280 const char* error_message = LiveEdit::RestartFrame(it.frame()); | 282 const char* error_message = LiveEdit::RestartFrame(it.frame()); |
281 if (error_message) { | 283 if (error_message) { |
282 return *(isolate->factory()->InternalizeUtf8String(error_message)); | 284 return *(isolate->factory()->InternalizeUtf8String(error_message)); |
283 } | 285 } |
284 return heap->true_value(); | 286 return heap->true_value(); |
285 } | 287 } |
286 } // namespace internal | 288 } // namespace internal |
287 } // namespace v8 | 289 } // namespace v8 |
OLD | NEW |