Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: src/asmjs/asm-js.cc

Issue 2523703002: [asmjs] Avoid truncation of error messages (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/asmjs/asm-typer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/asmjs/asm-js.h" 5 #include "src/asmjs/asm-js.h"
6 6
7 #include "src/api-natives.h" 7 #include "src/api-natives.h"
8 #include "src/api.h" 8 #include "src/api.h"
9 #include "src/asmjs/asm-typer.h" 9 #include "src/asmjs/asm-typer.h"
10 #include "src/asmjs/asm-wasm-builder.h" 10 #include "src/asmjs/asm-wasm-builder.h"
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 } 150 }
151 151
152 } // namespace 152 } // namespace
153 153
154 MaybeHandle<FixedArray> AsmJs::ConvertAsmToWasm(ParseInfo* info) { 154 MaybeHandle<FixedArray> AsmJs::ConvertAsmToWasm(ParseInfo* info) {
155 ErrorThrower thrower(info->isolate(), "Asm.js -> WebAssembly conversion"); 155 ErrorThrower thrower(info->isolate(), "Asm.js -> WebAssembly conversion");
156 wasm::AsmTyper typer(info->isolate(), info->zone(), *(info->script()), 156 wasm::AsmTyper typer(info->isolate(), info->zone(), *(info->script()),
157 info->literal()); 157 info->literal());
158 if (!typer.Validate()) { 158 if (!typer.Validate()) {
159 DCHECK(!info->isolate()->has_pending_exception()); 159 DCHECK(!info->isolate()->has_pending_exception());
160 PrintF("Validation of asm.js module failed: %s", typer.error_message()); 160 PrintF("Validation of asm.js module failed: %s\n", typer.error_message());
161 Flush();
162 return MaybeHandle<FixedArray>(); 161 return MaybeHandle<FixedArray>();
163 } 162 }
164 v8::internal::wasm::AsmWasmBuilder builder(info->isolate(), info->zone(), 163 v8::internal::wasm::AsmWasmBuilder builder(info->isolate(), info->zone(),
165 info->literal(), &typer); 164 info->literal(), &typer);
166 i::Handle<i::FixedArray> foreign_globals; 165 i::Handle<i::FixedArray> foreign_globals;
167 auto asm_wasm_result = builder.Run(&foreign_globals); 166 auto asm_wasm_result = builder.Run(&foreign_globals);
168 wasm::ZoneBuffer* module = asm_wasm_result.module_bytes; 167 wasm::ZoneBuffer* module = asm_wasm_result.module_bytes;
169 wasm::ZoneBuffer* asm_offsets = asm_wasm_result.asm_offset_table; 168 wasm::ZoneBuffer* asm_offsets = asm_wasm_result.asm_offset_table;
170 169
171 i::MaybeHandle<i::JSObject> compiled = wasm::CreateModuleObjectFromBytes( 170 i::MaybeHandle<i::JSObject> compiled = wasm::CreateModuleObjectFromBytes(
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 i::Object::GetProperty(module_object, single_function_name); 256 i::Object::GetProperty(module_object, single_function_name);
258 if (!single_function.is_null() && 257 if (!single_function.is_null() &&
259 !single_function.ToHandleChecked()->IsUndefined(isolate)) { 258 !single_function.ToHandleChecked()->IsUndefined(isolate)) {
260 return single_function; 259 return single_function;
261 } 260 }
262 return module_object; 261 return module_object;
263 } 262 }
264 263
265 } // namespace internal 264 } // namespace internal
266 } // namespace v8 265 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/asmjs/asm-typer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698