JavaScript のオブジェクトは参照渡しであることはよく言われますし、実際に JavaScript 言語処理系ではそのように扱われています。
--- ここから : サンプルコード ---
var obj = { a: "sample", b: "test" };
// 別の変数にオブジェクトを渡す
var obj2 = obj;
// 識別子 obj が参照するオブジェクトのプロパティの値を変更
obj.a = "modified";
// 識別子 obj2 が参照するオブジェクトも変更される
// -> obj と obj2 は同じオブジェクトを参照している (参照渡し)
print( obj2.a );
--- ここまで : サンプルコード ---
しかし、ECMA-262 (5th edition) [ http://www.ecma-international.org/publications/standards/Ecma-262.htm ] を読んでも、オブジェクトが参照渡しであるということがどこに書かれているのかわかりませんでした。 オブジェクトが参照渡しされるということがどこに書かれているかご存知でしたら教えてください。 よろしくお願いします。
PDF内をVariableで検索してみてもそれらしいのが見当たらなかったのでReferenceで検索してみるとp.13に下記の項目が見当たりました
Every object created by a constructor has an implicit reference (called the object’s prototype) to the value of its constructor’s “prototype” property. Furthermore, a prototype may have a non-null implicit reference to its prototype, and so on; this is called the prototype chain. When a reference is made to a property in an object, that reference is to the property of that name in the first object in the prototype chain that contains a property of that name. In other words, first the object mentioned directly is examined for such a property; if that object contains the named property, that is the property to which the reference refers; if that object does not contain the named property, the prototype for that object is examined next; and so on.
うまい翻訳が出来なかったので、該当箇所の翻訳をググってみました
(3th editionの原文との違いは確認していませんが同じはずです)
http://www2u.biglobe.ne.jp/~oz-07ams/prog/ecma262r3/4_Overview.html
ECMAScript はプロトタイプベースの継承をサポートする。コンストラクタは皆関連づけられたプロトタイプを持ち、また、そのコンストラクタに作成されたオブジェクトは皆、そのコンストラクタに関連づけられたプロトタイプ (オブジェクトのプロトタイプと呼ばれる) に暗黙の参照がある。プロトタイプは、更にそのプロトタイプに null 以外の暗黙の参照があるかもしれない(以下同様である); これはプロトタイプチェーン (prototype chain) と呼ばれる。オブジェクトのプロパティへが参照される場合、その参照は、プロトタイプチェーン中でその名前のプロパティを持つ最初のオブジェクトのプロパティへの参照である。言いかえれば、まず直接指定されたオブジェクトが、そのプロパティの有無を検査される; そのオブジェクトが指定されたプロパティを持つ場合、それが参照するプロパティである; そのオブジェクトが指定のプロパティを持たない場合、そのオブジェクトのプロトタイプが次に検査される; 以下同様に続く。
あらためて下記のシリーズなどを平行して見てみると判りやすいかもしれないです
http://www.atmarkit.co.jp/fdotnet/ajaxjs/ajaxjs03/ajaxjs03_01.html