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

Side by Side Diff: src/wasm/wasm-js.cc

Issue 2134333003: V8. ASM-2-WASM. Migrates asm-wasm-builder to the new asm-typer. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fixes build Created 4 years, 5 months 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
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/api-natives.h" 5 #include "src/api-natives.h"
6 #include "src/api.h" 6 #include "src/api.h"
7 #include "src/asmjs/asm-wasm-builder.h" 7 #include "src/asmjs/asm-wasm-builder.h"
8 #include "src/asmjs/typing-asm.h" 8 #include "src/asmjs/typing-asm.h"
9 #include "src/assert-scope.h" 9 #include "src/assert-scope.h"
10 #include "src/ast/ast.h" 10 #include "src/ast/ast.h"
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 } 142 }
143 143
144 if (!info->scope()->declarations()->at(0)->IsFunctionDeclaration()) { 144 if (!info->scope()->declarations()->at(0)->IsFunctionDeclaration()) {
145 thrower->Error("Asm.js validation failed: non-function declaration"); 145 thrower->Error("Asm.js validation failed: non-function declaration");
146 return nullptr; 146 return nullptr;
147 } 147 }
148 148
149 info->set_literal( 149 info->set_literal(
150 info->scope()->declarations()->at(0)->AsFunctionDeclaration()->fun()); 150 info->scope()->declarations()->at(0)->AsFunctionDeclaration()->fun());
151 151
152 v8::internal::AsmTyper typer(info->isolate(), info->zone(), *(info->script()), 152 v8::internal::wasm::AsmTyper typer(info->isolate(), info->zone(),
153 info->literal()); 153 *(info->script()), info->literal());
154 if (i::FLAG_enable_simd_asmjs) { 154 if (i::FLAG_enable_simd_asmjs) {
155 typer.set_allow_simd(true); 155 // TODO(jpp): no support.
bradnelson 2016/07/13 17:05:30 Just drop it.
John 2016/07/13 18:13:03 Done.
156 } 156 }
157 if (!typer.Validate()) { 157 if (!typer.Validate()) {
158 thrower->Error("Asm.js validation failed: %s", typer.error_message()); 158 thrower->Error("Asm.js validation failed: %s", typer.error_message());
159 return nullptr; 159 return nullptr;
160 } 160 }
161 161
162 v8::internal::wasm::AsmWasmBuilder builder(info->isolate(), info->zone(), 162 v8::internal::wasm::AsmWasmBuilder builder(info->isolate(), info->zone(),
163 info->literal(), &typer); 163 info->literal(), &typer);
164 164
165 return builder.Run(foreign_args); 165 return builder.Run(foreign_args);
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
505 int unused_property_fields = in_object_properties - pre_allocated; 505 int unused_property_fields = in_object_properties - pre_allocated;
506 Handle<Map> map = Map::CopyInitialMap( 506 Handle<Map> map = Map::CopyInitialMap(
507 prev_map, instance_size, in_object_properties, unused_property_fields); 507 prev_map, instance_size, in_object_properties, unused_property_fields);
508 508
509 context->set_wasm_function_map(*map); 509 context->set_wasm_function_map(*map);
510 } 510 }
511 } 511 }
512 512
513 } // namespace internal 513 } // namespace internal
514 } // namespace v8 514 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698