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

Unified Diff: src/lithium.h

Issue 6113004: Version 3.0.7 (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Created 9 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/ia32/macro-assembler-ia32.cc ('k') | src/lithium.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/lithium.h
diff --git a/test/mjsunit/bugs/bug-1015.js b/src/lithium.h
similarity index 53%
copy from test/mjsunit/bugs/bug-1015.js
copy to src/lithium.h
index 9e4406a9aabade1fa40dd13bd439a1d395dbe5cd..0ea37699fa7219d91d90a60f08415c86de67c7d5 100644
--- a/test/mjsunit/bugs/bug-1015.js
+++ b/src/lithium.h
@@ -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,39 @@
// (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
+#ifndef V8_LITHIUM_H_
+#define V8_LITHIUM_H_
-// Object and array literals should be created using DefineOwnProperty, and
-// therefore not hit setters in the prototype.
+#include "lithium-allocator.h"
-function mkFail(message) {
- return function () { assertUnreachable(message); }
-}
+namespace v8 {
+namespace internal {
-Object.defineProperty(Object.prototype, "foo",
- {get: mkFail("oget"), set: mkFail("oset")});
-Object.defineProperty(Array.prototype, "2",
- {get: mkFail("aget"), set: mkFail("aset")});
+class LGapNode;
-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 };
- }
-}
+class LGapResolver BASE_EMBEDDED {
+ public:
+ LGapResolver(const ZoneList<LMoveOperands>* moves, LOperand* marker_operand);
+ const ZoneList<LMoveOperands>* ResolveInReverseOrder();
-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();
-}
+ private:
+ LGapNode* LookupNode(LOperand* operand);
+ bool CanReach(LGapNode* a, LGapNode* b, int visited_id);
+ bool CanReach(LGapNode* a, LGapNode* b);
+ void RegisterMove(LMoveOperands move);
+ void AddResultMove(LOperand* from, LOperand* to);
+ void AddResultMove(LGapNode* from, LGapNode* to);
+ void ResolveCycle(LGapNode* start);
+
+ ZoneList<LGapNode*> nodes_;
+ ZoneList<LGapNode*> identified_cycles_;
+ ZoneList<LMoveOperands> result_;
+ LOperand* marker_operand_;
+ int next_visited_id_;
+ int bailout_after_ast_id_;
+};
+
+
+} } // namespace v8::internal
+
+#endif // V8_LITHIUM_H_
« no previous file with comments | « src/ia32/macro-assembler-ia32.cc ('k') | src/lithium.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698