| Index: test/mjsunit/regress/regress-91013.js
|
| diff --git a/src/shell.h b/test/mjsunit/regress/regress-91013.js
|
| similarity index 66%
|
| copy from src/shell.h
|
| copy to test/mjsunit/regress/regress-91013.js
|
| index ca510408cccde4a8cfe31e7f5bcfd15798695622..c61e2b1eeeb5989da13b74c9e824ab22084ee571 100644
|
| --- a/src/shell.h
|
| +++ b/test/mjsunit/regress/regress-91013.js
|
| @@ -1,4 +1,4 @@
|
| -// Copyright 2006-2008 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:
|
| @@ -24,32 +24,28 @@
|
| // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
| // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| -//
|
| -// A simple interactive shell. Enable with --shell.
|
| -
|
| -#ifndef V8_SHELL_H_
|
| -#define V8_SHELL_H_
|
| -
|
| -#include "../public/debug.h"
|
|
|
| -namespace v8 {
|
| -namespace internal {
|
| +// Test that KeyedStore stub for unboxed double arrays backing store
|
| +// correctly returns stored value as the result.
|
|
|
| -// Debug event handler for interactive debugging.
|
| -void handle_debug_event(v8::DebugEvent event,
|
| - v8::Handle<v8::Object> exec_state,
|
| - v8::Handle<v8::Object> event_data,
|
| - v8::Handle<Value> data);
|
| +// Flags: --allow-natives-syntax --unbox-double-arrays
|
|
|
| +// Create array with unboxed double array backing store.
|
| +var i = 100000;
|
| +var a = new Array(i);
|
| +for (var j = 0; j < i; j++) {
|
| + a[j] = 0.5;
|
| +}
|
|
|
| -class Shell {
|
| - public:
|
| - static void PrintObject(v8::Handle<v8::Value> obj);
|
| - // Run the read-eval loop, executing code in the specified
|
| - // environment.
|
| - static void Run(v8::Handle<v8::Context> context);
|
| -};
|
| +assertTrue(%HasFastDoubleElements(a));
|
|
|
| -} } // namespace v8::internal
|
| +// Store some smis into it.
|
| +for (var j = 0; j < 10; j++) {
|
| + assertEquals(j, a[j] = j);
|
| +}
|
|
|
| -#endif // V8_SHELL_H_
|
| +// Store some heap numbers into it.
|
| +for (var j = 0; j < 10; j++) {
|
| + var v = j + 0.5;
|
| + assertEquals(v, a[j] = v);
|
| +}
|
|
|