| OLD | NEW |
| 1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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 function StringRef(string) { | 5 function StringRef(string) { |
| 6 this.pos = -1; | 6 this.pos = -1; |
| 7 this.string = string; | 7 this.string = string; |
| 8 } | 8 } |
| 9 | 9 |
| 10 function DataRef(data) { | 10 function DataRef(data) { |
| (...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 352 var val = bytes[i]; | 352 var val = bytes[i]; |
| 353 if ((typeof val) == "string") val = val.charCodeAt(0); | 353 if ((typeof val) == "string") val = val.charCodeAt(0); |
| 354 view[i] = val | 0; | 354 view[i] = val | 0; |
| 355 } | 355 } |
| 356 return buffer; | 356 return buffer; |
| 357 } | 357 } |
| 358 | 358 |
| 359 WasmModuleBuilder.prototype.instantiate = function(ffi, memory) { | 359 WasmModuleBuilder.prototype.instantiate = function(ffi, memory) { |
| 360 var buffer = this.toBuffer(); | 360 var buffer = this.toBuffer(); |
| 361 if (memory != undefined) { | 361 if (memory != undefined) { |
| 362 return _WASMEXP_.instantiateModule(buffer, ffi, memory); | 362 return Wasm.instantiateModule(buffer, ffi, memory); |
| 363 } else { | 363 } else { |
| 364 return _WASMEXP_.instantiateModule(buffer, ffi); | 364 return Wasm.instantiateModule(buffer, ffi); |
| 365 } | 365 } |
| 366 } | 366 } |
| OLD | NEW |