Chromium Code Reviews| 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/macro-assembler.h" | 5 #include "src/macro-assembler.h" |
| 6 #include "src/objects.h" | 6 #include "src/objects.h" |
| 7 #include "src/v8.h" | 7 #include "src/v8.h" |
| 8 | 8 |
| 9 #include "src/simulator.h" | 9 #include "src/simulator.h" |
| 10 | 10 |
| (...skipping 16 matching lines...) Expand all Loading... | |
| 27 if (module.globals) os << module.functions->size() << " globals"; | 27 if (module.globals) os << module.functions->size() << " globals"; |
| 28 if (module.data_segments) os << module.functions->size() << " data segments"; | 28 if (module.data_segments) os << module.functions->size() << " data segments"; |
| 29 return os; | 29 return os; |
| 30 } | 30 } |
| 31 | 31 |
| 32 | 32 |
| 33 std::ostream& operator<<(std::ostream& os, const WasmFunction& function) { | 33 std::ostream& operator<<(std::ostream& os, const WasmFunction& function) { |
| 34 os << "WASM function with signature " << *function.sig; | 34 os << "WASM function with signature " << *function.sig; |
| 35 | 35 |
| 36 os << " locals: "; | 36 os << " locals: "; |
| 37 if (function.local_int32_count) | 37 if (function.local_i32_count) os << function.local_i32_count << " i32s "; |
| 38 os << function.local_int32_count << " int32s "; | 38 if (function.local_i64_count) os << function.local_i64_count << " i64s "; |
| 39 if (function.local_int64_count) | 39 if (function.local_f32_count) os << function.local_f32_count << " f32s "; |
| 40 os << function.local_int64_count << " int64s "; | 40 if (function.local_f64_count) os << function.local_f64_count << " f64s "; |
|
JF
2016/02/03 10:36:33
What's the `s`?
| |
| 41 if (function.local_float32_count) | |
| 42 os << function.local_float32_count << " float32s "; | |
| 43 if (function.local_float64_count) | |
| 44 os << function.local_float64_count << " float64s "; | |
| 45 | 41 |
| 46 os << " code bytes: " | 42 os << " code bytes: " |
| 47 << (function.code_end_offset - function.code_start_offset); | 43 << (function.code_end_offset - function.code_start_offset); |
| 48 return os; | 44 return os; |
| 49 } | 45 } |
| 50 | 46 |
| 51 | 47 |
| 52 // A helper class for compiling multiple wasm functions that offers | 48 // A helper class for compiling multiple wasm functions that offers |
| 53 // placeholder code objects for calling functions that are not yet compiled. | 49 // placeholder code objects for calling functions that are not yet compiled. |
| 54 class WasmLinker { | 50 class WasmLinker { |
| (...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 530 } | 526 } |
| 531 if (result->IsHeapNumber()) { | 527 if (result->IsHeapNumber()) { |
| 532 return static_cast<int32_t>(HeapNumber::cast(*result)->value()); | 528 return static_cast<int32_t>(HeapNumber::cast(*result)->value()); |
| 533 } | 529 } |
| 534 thrower.Error("WASM.compileRun() failed: Return value should be number"); | 530 thrower.Error("WASM.compileRun() failed: Return value should be number"); |
| 535 return -1; | 531 return -1; |
| 536 } | 532 } |
| 537 } // namespace wasm | 533 } // namespace wasm |
| 538 } // namespace internal | 534 } // namespace internal |
| 539 } // namespace v8 | 535 } // namespace v8 |
| OLD | NEW |