OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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() { | 5 (function() { |
6 | 6 |
7 "use strict"; | 7 "use strict"; |
8 | 8 |
9 %CheckIsBootstrapping(); | 9 %CheckIsBootstrapping(); |
10 | 10 |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 if (%_IsConstructCall()) { | 106 if (%_IsConstructCall()) { |
107 if (IS_ARRAYBUFFER(arg1)) { | 107 if (IS_ARRAYBUFFER(arg1)) { |
108 NAMEConstructByArrayBuffer(this, arg1, arg2, arg3); | 108 NAMEConstructByArrayBuffer(this, arg1, arg2, arg3); |
109 } else if (IS_NUMBER(arg1) || IS_STRING(arg1) || | 109 } else if (IS_NUMBER(arg1) || IS_STRING(arg1) || |
110 IS_BOOLEAN(arg1) || IS_UNDEFINED(arg1)) { | 110 IS_BOOLEAN(arg1) || IS_UNDEFINED(arg1)) { |
111 NAMEConstructByLength(this, arg1); | 111 NAMEConstructByLength(this, arg1); |
112 } else { | 112 } else { |
113 NAMEConstructByArrayLike(this, arg1); | 113 NAMEConstructByArrayLike(this, arg1); |
114 } | 114 } |
115 } else { | 115 } else { |
116 throw MakeTypeError("constructor_not_function", ["NAME"]) | 116 throw MakeTypeError(kConstructorNotFunction, "NAME") |
117 } | 117 } |
118 } | 118 } |
119 | 119 |
120 function NAME_GetBuffer() { | 120 function NAME_GetBuffer() { |
121 if (!(%_ClassOf(this) === 'NAME')) { | 121 if (!(%_ClassOf(this) === 'NAME')) { |
122 throw MakeTypeError(kIncompatibleMethodReceiver, "NAME.buffer", this); | 122 throw MakeTypeError(kIncompatibleMethodReceiver, "NAME.buffer", this); |
123 } | 123 } |
124 return %TypedArrayGetBuffer(this); | 124 return %TypedArrayGetBuffer(this); |
125 } | 125 } |
126 | 126 |
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
462 "setUint32", DataViewSetUint32JS, | 462 "setUint32", DataViewSetUint32JS, |
463 | 463 |
464 "getFloat32", DataViewGetFloat32JS, | 464 "getFloat32", DataViewGetFloat32JS, |
465 "setFloat32", DataViewSetFloat32JS, | 465 "setFloat32", DataViewSetFloat32JS, |
466 | 466 |
467 "getFloat64", DataViewGetFloat64JS, | 467 "getFloat64", DataViewGetFloat64JS, |
468 "setFloat64", DataViewSetFloat64JS | 468 "setFloat64", DataViewSetFloat64JS |
469 ]); | 469 ]); |
470 | 470 |
471 })(); | 471 })(); |
OLD | NEW |