| Index: src/x64/lithium-x64.cc
|
| diff --git a/test/mjsunit/bugs/bug-1015.js b/src/x64/lithium-x64.cc
|
| similarity index 53%
|
| copy from test/mjsunit/bugs/bug-1015.js
|
| copy to src/x64/lithium-x64.cc
|
| index 9e4406a9aabade1fa40dd13bd439a1d395dbe5cd..8afa9d47edf086bbea10a346ef99dd8f0db1aa1b 100644
|
| --- a/test/mjsunit/bugs/bug-1015.js
|
| +++ b/src/x64/lithium-x64.cc
|
| @@ -1,4 +1,4 @@
|
| -// Copyright 2010 the V8 project authors. All rights reserved.
|
| +// Copyright 2011 the V8 project authors. All rights reserved.
|
| // Redistribution and use in source and binary forms, with or without
|
| // modification, are permitted provided that the following conditions are
|
| // met:
|
| @@ -25,42 +25,47 @@
|
| // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
| -// See: http://code.google.com/p/v8/issues/detail?id=1015
|
| +#include "x64/lithium-x64.h"
|
| +#include "x64/lithium-codegen-x64.h"
|
|
|
| -// Object and array literals should be created using DefineOwnProperty, and
|
| -// therefore not hit setters in the prototype.
|
| +namespace v8 {
|
| +namespace internal {
|
|
|
| -function mkFail(message) {
|
| - return function () { assertUnreachable(message); }
|
| +LChunk* LChunkBuilder::Build() {
|
| + ASSERT(is_unused());
|
| + chunk_ = new LChunk(graph());
|
| + HPhase phase("Building chunk", chunk_);
|
| + status_ = BUILDING;
|
| + const ZoneList<HBasicBlock*>* blocks = graph()->blocks();
|
| + for (int i = 0; i < blocks->length(); i++) {
|
| + HBasicBlock* next = NULL;
|
| + if (i < blocks->length() - 1) next = blocks->at(i + 1);
|
| + DoBasicBlock(blocks->at(i), next);
|
| + if (is_aborted()) return NULL;
|
| + }
|
| + status_ = DONE;
|
| + return chunk_;
|
| }
|
|
|
| -Object.defineProperty(Object.prototype, "foo",
|
| - {get: mkFail("oget"), set: mkFail("oset")});
|
| -Object.defineProperty(Array.prototype, "2",
|
| - {get: mkFail("aget"), set: mkFail("aset")});
|
|
|
| -function inFunction() {
|
| - for (var i = 0; i < 10; i++) {
|
| - // in loop.
|
| - var ja = JSON.parse('[1,2,3,4]');
|
| - var jo = JSON.parse('{"bar": 10, "foo": 20}')
|
| - var jop = JSON.parse('{"bar": 10, "__proto__": { }, "foo": 20}')
|
| - var a = [1,2,3,4];
|
| - var o = { bar: 10, foo: 20 };
|
| - var op = { __proto__: { set bar(v) { assertUnreachable("bset"); } },
|
| - bar: 10 };
|
| +void LChunkBuilder::Abort(const char* format, ...) {
|
| + if (FLAG_trace_bailout) {
|
| + SmartPointer<char> debug_name = graph()->debug_name()->ToCString();
|
| + PrintF("Aborting LChunk building in @\"%s\": ", *debug_name);
|
| + va_list arguments;
|
| + va_start(arguments, format);
|
| + OS::VPrint(format, arguments);
|
| + va_end(arguments);
|
| + PrintF("\n");
|
| }
|
| + status_ = ABORTED;
|
| }
|
|
|
| -for (var i = 0; i < 10; i++) {
|
| - // In global scope.
|
| - var ja = JSON.parse('[1,2,3,4]');
|
| - var jo = JSON.parse('{"bar": 10, "foo": 20}')
|
| - var jop = JSON.parse('{"bar": 10, "__proto__": { }, "foo": 20}')
|
| - var a = [1,2,3,4];
|
| - var o = { bar: 10, foo: 20 };
|
| - var op = { __proto__: { set bar(v) { assertUnreachable("bset"); } },
|
| - bar: 10 };
|
| - // In function scope.
|
| - inFunction();
|
| +
|
| +void LChunkBuilder::DoBasicBlock(HBasicBlock* block, HBasicBlock* next_block) {
|
| + ASSERT(is_building());
|
| + Abort("Lithium not implemented on x64.");
|
| }
|
| +
|
| +
|
| +} } // namespace v8::internal
|
|
|