| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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/objects.h" | 5 #include "src/objects.h" |
| 6 | 6 |
| 7 #include <cmath> | 7 #include <cmath> |
| 8 #include <iomanip> | 8 #include <iomanip> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <sstream> | 10 #include <sstream> |
| (...skipping 10321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10332 array->SetFunction(frame_count, *function); | 10332 array->SetFunction(frame_count, *function); |
| 10333 array->SetCode(frame_count, *code); | 10333 array->SetCode(frame_count, *code); |
| 10334 array->SetOffset(frame_count, Smi::FromInt(offset)); | 10334 array->SetOffset(frame_count, Smi::FromInt(offset)); |
| 10335 array->SetFlags(frame_count, Smi::FromInt(flags)); | 10335 array->SetFlags(frame_count, Smi::FromInt(flags)); |
| 10336 array->set(kFrameCountIndex, Smi::FromInt(frame_count + 1)); | 10336 array->set(kFrameCountIndex, Smi::FromInt(frame_count + 1)); |
| 10337 return array; | 10337 return array; |
| 10338 } | 10338 } |
| 10339 | 10339 |
| 10340 // static | 10340 // static |
| 10341 Handle<FrameArray> FrameArray::AppendWasmFrame(Handle<FrameArray> in, | 10341 Handle<FrameArray> FrameArray::AppendWasmFrame(Handle<FrameArray> in, |
| 10342 Handle<Object> wasm_object, | 10342 Handle<Object> wasm_instance, |
| 10343 int wasm_function_index, | 10343 int wasm_function_index, |
| 10344 Handle<AbstractCode> code, | 10344 Handle<AbstractCode> code, |
| 10345 int offset, int flags) { | 10345 int offset, int flags) { |
| 10346 const int frame_count = in->FrameCount(); | 10346 const int frame_count = in->FrameCount(); |
| 10347 const int new_length = LengthFor(frame_count + 1); | 10347 const int new_length = LengthFor(frame_count + 1); |
| 10348 Handle<FrameArray> array = EnsureSpace(in, new_length); | 10348 Handle<FrameArray> array = EnsureSpace(in, new_length); |
| 10349 array->SetWasmObject(frame_count, *wasm_object); | 10349 array->SetWasmInstance(frame_count, *wasm_instance); |
| 10350 array->SetWasmFunctionIndex(frame_count, Smi::FromInt(wasm_function_index)); | 10350 array->SetWasmFunctionIndex(frame_count, Smi::FromInt(wasm_function_index)); |
| 10351 array->SetCode(frame_count, *code); | 10351 array->SetCode(frame_count, *code); |
| 10352 array->SetOffset(frame_count, Smi::FromInt(offset)); | 10352 array->SetOffset(frame_count, Smi::FromInt(offset)); |
| 10353 array->SetFlags(frame_count, Smi::FromInt(flags)); | 10353 array->SetFlags(frame_count, Smi::FromInt(flags)); |
| 10354 array->set(kFrameCountIndex, Smi::FromInt(frame_count + 1)); | 10354 array->set(kFrameCountIndex, Smi::FromInt(frame_count + 1)); |
| 10355 return array; | 10355 return array; |
| 10356 } | 10356 } |
| 10357 | 10357 |
| 10358 void FrameArray::ShrinkToFit() { Shrink(LengthFor(FrameCount())); } | 10358 void FrameArray::ShrinkToFit() { Shrink(LengthFor(FrameCount())); } |
| 10359 | 10359 |
| (...skipping 9853 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 20213 ns, Accessors::ModuleNamespaceEntryInfo(isolate, name, attr)) | 20213 ns, Accessors::ModuleNamespaceEntryInfo(isolate, name, attr)) |
| 20214 .Check(); | 20214 .Check(); |
| 20215 } | 20215 } |
| 20216 JSObject::PreventExtensions(ns, THROW_ON_ERROR).ToChecked(); | 20216 JSObject::PreventExtensions(ns, THROW_ON_ERROR).ToChecked(); |
| 20217 | 20217 |
| 20218 return ns; | 20218 return ns; |
| 20219 } | 20219 } |
| 20220 | 20220 |
| 20221 } // namespace internal | 20221 } // namespace internal |
| 20222 } // namespace v8 | 20222 } // namespace v8 |
| OLD | NEW |