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/wasm/wasm-objects.h" | 5 #include "src/wasm/wasm-objects.h" |
6 #include "src/utils.h" | 6 #include "src/utils.h" |
7 | 7 |
8 #include "src/base/iterator.h" | 8 #include "src/base/iterator.h" |
9 #include "src/debug/debug-interface.h" | 9 #include "src/debug/debug-interface.h" |
10 #include "src/objects-inl.h" | 10 #include "src/objects-inl.h" |
(...skipping 1090 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1101 locations->push_back(v8::debug::Location(func_idx, offset)); | 1101 locations->push_back(v8::debug::Location(func_idx, offset)); |
1102 } | 1102 } |
1103 } | 1103 } |
1104 return true; | 1104 return true; |
1105 } | 1105 } |
1106 | 1106 |
1107 bool WasmCompiledModule::SetBreakPoint( | 1107 bool WasmCompiledModule::SetBreakPoint( |
1108 Handle<WasmCompiledModule> compiled_module, int* position, | 1108 Handle<WasmCompiledModule> compiled_module, int* position, |
1109 Handle<Object> break_point_object) { | 1109 Handle<Object> break_point_object) { |
1110 Isolate* isolate = compiled_module->GetIsolate(); | 1110 Isolate* isolate = compiled_module->GetIsolate(); |
1111 | 1111 fprintf(stderr, "WasmCompiledModule::SetBreakpoint: %d\n", *position); |
1112 // Find the function for this breakpoint. | 1112 // Find the function for this breakpoint. |
1113 int func_index = compiled_module->GetContainingFunction(*position); | 1113 int func_index = compiled_module->GetContainingFunction(*position); |
1114 if (func_index < 0) return false; | 1114 if (func_index < 0) return false; |
1115 WasmFunction& func = compiled_module->module()->functions[func_index]; | 1115 WasmFunction& func = compiled_module->module()->functions[func_index]; |
1116 int offset_in_func = *position - func.code_start_offset; | 1116 int offset_in_func = *position - func.code_start_offset; |
1117 | 1117 |
1118 // According to the current design, we should only be called with valid | 1118 // According to the current design, we should only be called with valid |
1119 // breakable positions. | 1119 // breakable positions. |
1120 DCHECK(IsBreakablePosition(compiled_module, func_index, offset_in_func)); | 1120 DCHECK(IsBreakablePosition(compiled_module, func_index, offset_in_func)); |
1121 | 1121 |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1174 if (!array->get(kWrapperInstanceObject)->IsWeakCell()) return false; | 1174 if (!array->get(kWrapperInstanceObject)->IsWeakCell()) return false; |
1175 Isolate* isolate = array->GetIsolate(); | 1175 Isolate* isolate = array->GetIsolate(); |
1176 if (!array->get(kNextInstanceWrapper)->IsUndefined(isolate) && | 1176 if (!array->get(kNextInstanceWrapper)->IsUndefined(isolate) && |
1177 !array->get(kNextInstanceWrapper)->IsFixedArray()) | 1177 !array->get(kNextInstanceWrapper)->IsFixedArray()) |
1178 return false; | 1178 return false; |
1179 if (!array->get(kPreviousInstanceWrapper)->IsUndefined(isolate) && | 1179 if (!array->get(kPreviousInstanceWrapper)->IsUndefined(isolate) && |
1180 !array->get(kPreviousInstanceWrapper)->IsFixedArray()) | 1180 !array->get(kPreviousInstanceWrapper)->IsFixedArray()) |
1181 return false; | 1181 return false; |
1182 return true; | 1182 return true; |
1183 } | 1183 } |
OLD | NEW |